#pragma once

namespace My {

// Inline implementations

inline 	ActionQueue::~ActionQueue()
{ 	
	while (!m_Deque.empty()) 
	{
		delete m_Deque.back();
		m_Deque.pop_back();
	}
}
	
inline bool ActionQueue::Empty() const
	{ return  m_Deque.empty(); }

inline Size ActionQueue::Capacity() const
	{ return m_Capacity; }

inline Size ActionQueue::Size() const
	{ return m_Deque.size(); }

inline Action * ActionQueue::operator [](int index) const
	{ return m_Deque[index]; }

inline int ActionQueue::Position() const
	{ return m_Position; }

inline Action * ActionQueue::Undoable() const
	{ return m_Position < m_Deque.size() ? m_Deque[m_Position] : 0; }
	
inline Action * ActionQueue::Redoable() const
	{ return m_Position > 0 ? m_Deque[m_Position - 1] : 0; }
	
} // My
